<template>
    <view class="wrap">
        <view class="list">
            <view class="label">客户姓名</view>
            <view class="value">{{item.customerName|filterNull}}</view>
        </view>
        <view class="list">
            <view class="label">签约号</view>
            <view class="value">{{item.orderNo|filterNull}}</view>
        </view>
        <view class="list">
            <view class="label">扣款单号</view>
            <view class="value">{{item.billNo|filterNull}}</view>
        </view>
        <view class="list">
            <view class="label">扣款期数</view>
            <!-- <view class="value">3/10期</view> -->
            <view class="value">{{item.stageStr|filterNull}}期</view>
        </view>
        <view class="list">
            <view class="label">预计扣款时间</view>
            <view class="value">{{item.expectDecutionTime|filterNull}}</view>
        </view>
        <view class="list"
              v-if="item.expectDecutionFee">
            <view class="label">预计扣款金额/元</view>
            <view class="value">¥{{item.expectDecutionFee|filterNull}}/元</view>
        </view>
        <!-- <view class="list"
              v-if="item.applyDecutionFee">
            <view class="label">申请扣款金额/元</view>
            <view class="value">¥{{item.applyDecutionFee|filterNull}}/元</view>
        </view> -->
        <view class="list">
            <view class="label">实际扣款金额/元</view>
            <view class="value">¥{{item.actualDecutionFee|filterNull}}/元</view>
        </view>
        <view class="list">
            <view class="label">剩余扣款金额/元</view>
            <view class="value">¥{{item.remainFee|filterNull}}/元</view>
        </view>
        <view class="list">
            <view class="label">扣款方式</view>
            <view class="value">{{item.billDecutionType|billDecutionType}}</view>
        </view>
        <view class="list tip">
            <view class="label">扣款状态</view>
            <view class="value">{{item.decutionStatus|decutionStatus}}</view>
        </view>
        <view class="footer">
            <view>
                <view class="detail"
                      @click="onClick">详情</view>
            </view>
            <view>
                <view class="detail"
                      v-if="Number(item.remainFee)&& item.decutionStatus!=5"
                      @click="onClick">扣款</view>
                <view class="tip"
                      v-if="item.failReason">{{item.failReason|filterNull}}</view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    props: {
        item: {
            type: Object,
            required: true,
        },
    },
    data() {
        return {
            linkUrl: '/pagesA/order/koukuan/detail'
        }
    },
    methods: {
        onClick() {
            uni.navigateTo({
                url: `${this.linkUrl}?signOrderBillId=${this.item.signOrderBillId}`
            })
        },
    },
}
</script>

<style lang="scss" scoped src="@/styles/mmv.scss"></style>